/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2em;
    color: #007AFF;
}

.logo h1 {
    font-weight: 600;
    color: #1d1d1f;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #007AFF;
    color: white;
}

/* 主内容区域 */
.main-content {
    flex: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 2.5em;
    font-weight: 600;
    color: white;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007AFF;
    color: white;
}

.btn-primary:hover {
    background: #0056CC;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #8E8E93;
    color: white;
}

.btn-danger {
    background: #FF3B30;
    color: white;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* TODO卡片样式 */
.todos-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.todo-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.todo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.todo-card.completed {
    opacity: 0.7;
}

.todo-card.completed .todo-title {
    text-decoration: line-through;
    color: #666;
}

.todo-content {
    flex: 1;
}

.todo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.todo-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #1d1d1f;
}

.todo-actions {
    display: flex;
    gap: 8px;
}

.todo-description {
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.todo-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: #888;
}

.todo-link {
    color: #007AFF;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.todo-link:hover {
    background: rgba(0, 122, 255, 0.1);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.empty-state i {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* 统计卡片 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.stat-card i {
    font-size: 2em;
    color: #007AFF;
    margin-bottom: 12px;
}

.stat-card h3 {
    font-size: 2em;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-card p {
    color: #666;
}

/* 详情页样式 */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.back-btn {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.todo-detail {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.detail-card {
    max-width: 600px;
}

.detail-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    background: #34C759;
    color: white;
    margin-bottom: 20px;
    font-weight: 500;
}

.detail-status.completed {
    background: #34C759;
}

.detail-status:not(.completed) {
    background: #FF9500;
}

.detail-title {
    font-size: 2.5em;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1d1d1f;
}

.detail-description {
    margin-bottom: 24px;
}

.detail-description h3 {
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.detail-description p {
    line-height: 1.6;
    color: #333;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #666;
}

/* 表单样式 */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.todo-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 600px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d1d1f;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #E5E5EA;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    transform: scale(1.2);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* 页脚样式 */
.footer {
    margin-top: 40px;
    text-align: center;
    color: white;
    opacity: 0.8;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        width: 100%;
        justify-content: center;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .detail-header {
        flex-direction: column;
        gap: 15px;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
    }
}
/* 在现有CSS末尾添加 */

/* 错误页面样式 */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.error-content {
    text-align: center;
    color: white;
}

.error-content i {
    font-size: 4em;
    margin-bottom: 20px;
    color: #FF3B30;
}

.error-content h1 {
    font-size: 6em;
    font-weight: 700;
    margin-bottom: 10px;
}

.error-content h2 {
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: 500;
}

.error-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.8;
}